home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / A-B / ButtonStax.cpt / F_X / card_4811.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  58 lines

  1. -- card: 4811 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3889
  5. -- name: 
  6.  
  7.  
  8. -- part 3 (button)
  9. -- low flags: 00
  10. -- high flags: A000
  11. -- rect: left=19 top=31 right=84 bottom=83
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 19769 / 19769
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Button FX
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   global theScript
  23.   -- This gets the script of the most recently added button
  24.   get the script of button the number of buttons
  25.   put it into theScript
  26.   put 1 into theLine
  27.   repeat until theLine > the number of lines in theScript
  28.     if line theLine of theScript contains "go" then
  29.       visual iris open slow
  30.       push this card
  31.       go to card id 3165 of stack "F/X"
  32.       exit mouseUp
  33.     end if
  34.     add 1 to theLine
  35.   end repeat
  36.   -- if we got this far, the button has no destination
  37.   if theLine > the number of lines in theScript then
  38.     answer "Set a destination first, please!"
  39.   end if
  40.  
  41. end mouseUp
  42.  
  43.  
  44. -- part contents for background part 2
  45. ----- text -----
  46. How To Use Button F/X
  47.  
  48. -- part contents for background part 5
  49. ----- text -----
  50. 3
  51.  
  52. -- part contents for background part 1
  53. ----- text -----
  54.  
  55. NOTES:
  56. Since Button F/X works on the LAST BUTTON ADDED, you must create a button, then use Button F/X to modify it BEFORE you create another button.
  57.  
  58. You can experiment with different effects by  setting an effect, trying it out (push your new button, then press the ~ key to return) and then pressing the Button F/X button again to choose a new effect. Button F/X removes any previous visual effect from the button script before it adds the new one.